// 动态js
var $scope = null;
$(function() {
	var appElement = document.querySelector('[ng-controller=main]');
	$scope = angular.element(appElement).scope();
	var portfolioId = locationHref("portfolioId");
	$scope.portfolioId=portfolioId;
	  initialPage($scope);
	$scope.methods.artworkList();
	  
});
// 初始化值
function initialPage($scope) {
	
	
}
var mainApp = angular.module("mainApp", []);
mainApp.controller('main', function($scope) {
	$scope.search={};
	$scope.methods = {
		//动态列表
		artworkList : function() {
			$.ajax({
			    url:$.shysUrlPrefix+'/website/artworkList?portfolioId='+$scope.portfolioId,
			    type:'get',
			    dataType:'JSON',
				async:true,  //同步方式发起请求
			    success:function (data) {
					if (data.data != null) {
					   $scope.artworkList = data.data.artworkList;	//
					    $scope.portfolioName=data.data.portfolioName
					   $scope.$apply();
					} else {
					   
					}
					
			    },
			
			})
		},
		// 单个下一页
		labelHeadClick: function (lab) {	
		 window.location.href="academic-next.html?portfolioId="+lab.id+'&portfolioName='+encodeURI(encodeURI($scope.portfolioName))
		},
		
	};
});











